Modular multi-homed web server with animation player

ABSTRACT

A multi-homed web server with modular functionality is disclosed including a plurality of virtual hosts operable in a web server. The multi-web server is configured to serve animations to clients over the web. The multi-web server may determine whether the specified time to send a subsequent graphic in a series of graphics has passed, and if the specified time has passed, then send a next graphic the next appropriate time.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.12/841,045, filed Jul. 21, 2010, which is a continuation of U.S. patentapplication Ser. No. 11/156,994, filed Jun. 16, 2005, now abandoned,which is a continuation of U.S. patent application Ser. No. 10/700,407,filed Nov. 3, 2003, now issued as U.S. Pat. No. 7,386,880, which is acontinuation of U.S. patent application Ser. No. 09/189,697, filed Nov.10, 1998, now issued as U.S. Pat. No. 6,647,422, which is a divisionalof U.S. patent application Ser. No. 08/607,068, filed Feb. 26, 1996, nowissued as U.S. Pat. No. 5,870,550, all of which are hereby incorporatedby reference as if set forth herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to Web servers, i.e., server software fordelivering content through the World Wide Web.

2. State of the Art

The Internet, and in particular the content-rich World Wide Web (“theWeb”), have experienced and continue to experience explosive growth. TheWeb is an Internet service that organizes information using hypermedia.Each document can contain embedded reference to images, audio, or otherdocuments. A user browses for information by following references. Webdocuments are specified in HyperText Markup Language (HTML), a computerlanguage used to specify the contents and format of a hypermediadocument (e.g., a homepage). HyperText Transfer Protocol (HTTP) is theprotocol used to access a Web document.

Web servers offer Web services to Web clients, namely Web browsers.Primarily, Web servers retrieve Web documents and send them to a Webbrowser, which displays Web documents and provides for user interactionwith those documents. Unlike Web browsers, of which there are many, thenumber of commercially available Web server packages, although growing,remains small. Currently, popular Web servers include those availablefrom Netscape Communications, National Center for SupercomputingApplications (NCSA), and CERN.

Ideally, a Web server should be able to respond to and expeditiouslyservice every connection request it receives, regardless of the volumeof requests. The job of getting the request to the server and the replyback to the requester falls to the telecommunications infrastructure. Inreality, however, because of machine limitations, there is a limit tothe number of requests the server can serve within a given period oftime without slowing down the machine to an extent that, from theviewpoint of the users, is perceptible, irritating, or simplyintolerable. Web servers have typically followed one of two extremeapproaches, either “rationing service” by denying further requests oncesome limiting number of requests are already pending, or attempting toservice all requests received and hence slowing the machine to a crawlduring extremely busy periods.

Webs servers, most of which are written for UNIX, often run under INETD(“eye-net-D”), an Internet services daemon in UNIX. (A daemon is a UNIXprocess that remains memory resident and causes specified actions to betaken upon the occurrence of specified events.) Typically, if more thansixty connection requests occur within a minute, INETD will shut downservice for a period of time, usually five minutes, during which serviceremains entirely unavailable. Such interruptions are clearlyundesirable, both on the part of the client-requester and the contentprovider. In the case of other Web servers, when the server is broughtup, some fixed number of copies of the server, e.g. 50, are started. Upto 50 simultaneous connections may therefore be handled. A request for a51st connection, however, will be denied, even if many or all of the 50existing connections are temporarily idle.

Other considerations further complicate the picture of what is desiredfrom a Web server, including considerations such as cost, perception andthe very dynamic nature of the Web and Web content. Typically, onlylarge organizations, or smaller organizations having considerabletechnical expertise, have their own Web servers. Establishing andrunning a Web server can entail a significant and ongoing investment intime and money. The alternative is for a person or organization to payan Internet Service Provider (ISP) to house its content on the Web andmake it available through the ISP's Web server. Of course, mostorganizations (and people) would like to be perceived as not lacking ineither money or expertise. In cyberspace, therefore, an important factorin how an organization is perceived is its Web address. A Web address ofXYZCorp.com commands, in a manner of speaking, immediate attention andrespect, whereas a Web address of ISP.com/XYZCorp does not, at least tothe same extent.

For a person or organization to have the best of both worlds, i.e.,house its content on someone else's server but have it appear to betheir own, the server must provide the capability of multi-homing. Amulti-homed server behaves as multiple servers in one, responding torequests to multiple addresses, e.g. ISP.com, XYZCorp.com,johnsmith.com, etc. Some existing servers are multi-homed. However, themulti-homing capabilities of existing servers are quite limited. Forexample, although different customers may have different needs anddesire different levels of service, in existing multi-homed servers, asregards a particular physical machine, the core functionality offered bythe server (whether extensive or more limited) is necessarily the samefor each customer.

An entirely different question concerns the extensibility of Webservers. Because the Web is continually in flux, a Web server mustprovide a mechanism that allows for extensions to be added to the Webserver, or face obsolescence. Presently, the commonly accepted mechanismfor extending the capabilities of existing Web servers is one called theCommon Gateway Interface (CGI). The CGI specification has emerged as astandard way to extend the services and capabilities of a Web serverhaving a defined core functionality. CGI “scripts” are used for thispurpose. CGI provides an Application Program Interface, supported byCGI-capable Web servers, to which programmers can write to extend thefunctionality of the server. CGI scripts, however, although they may becompiled, are typically interpreted, meaning that they run at least tentimes slower, typically, than compiled binary code. As the complexity ofthe Web, and hence the amount of time spent by a Web server running CGIscripts, increases, the Web server unavoidably suffers a significantperformance hit.

What is needed, then, is a Web server that overcomes the foregoingdifficulties.

SUMMARY OF THE INVENTION

The present invention, generally speaking, provides a Web server havinga multi-homed, modular framework. The modular framework allowsextensions to the Web server to be easily compiled into the Web server,allowing the extensions to run natively as part of the server instead ofincurring the overhead typical of CGI scripts, for example. Themulti-homing capabilities of the Web server provide the appearance toWeb users of multiple distinct and independent servers, allowing a smallcompany or individual to create the same kind of Web presence enjoyed bylarger companies. In effect, multiple virtual servers run on the samephysical machine. The Web server as a whole is easily extensible toallow additional capabilities to be provided natively within the Webserver itself. Furthermore, each virtual server is independentlyconfigurable in order to turn different capabilities on or off or tomodify operation of the virtual server. The Web server is also providedwith enhanced security features, built-in animation capability, andother features that afford maximum flexibility and versatility.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention may be further understood from the followingdescription in conjunction with the appended drawing. In the drawing:

FIG. 1 is a block diagram of one embodiment of the Web server of thepresent invention;

FIG. 2 is a block diagram illustrating the manner in which the presentWeb server handles connection requests;

FIG. 3 is an example of a database-like data structure that allowsextensions to the Web server to be easily added so as to run natively aspart of the Web server;

FIG. 4 is an example of a portion of the master configuration file ofFIG. 1;

FIG. 5 is an example of a conventional Web server log entry;

FIG. 6 is an example of a Web server log entry in accordance with oneaspect of the present invention; and

FIG. 7 is a block diagram illustrating in greater detail the structureof the present Web server.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to FIG. 1, an overview of the present Web server will beprovided. The Web server is a software package that runs on a physicalmachine 100, e.g., a super-minicomputer such as a SunServer machineavailable from Sun Microsystems of Menlo Park, Calif., or on any of awide variety of suitable UNIX platforms.

Conventionally, a Web server is provided with some fixed feature set. Toprovide additional capabilities, CGI scripts are used. Furthermore, thelogical view of the Web server on the Web is the same as the physicalview of the underlying hardware. That is, a single physical machinerunning a conventional Web server appears on the Web as a single logicalmachine.

The present Web server, on the other hand, although it runs on a singlephysical machine 100, appears on the Web as multiple virtual hosts VH1through VHn. Each virtual host has a separate configuration sub-file(sub-database) C1, C2, etc., that may be derived from a masterconfiguration file, or database, 110. A defaults file 111 is used toprovide plug-in extensibility of the Web server. The defaults file iscompiled as part of the Web server and expresses at the program levelwhat the program is to do to provide various kinds of functionality. Theconfiguration sub-files, on the other hand, are text files that may beused to enable or disable different functions for each virtual host.

Each virtual host also has its own separate log file L1, L2, etc. Thisfeature allows for users of different hosts on the same machine to haveaccess to up-to-the minute log information without allowing access tologs of other pages—a very useful feature for ISPs, for example. Eachvirtual host is capable of servicing many simultaneous connections. Thenumber of allowable simultaneous connections is configurable and may belimited to a predetermined number, or may be limited not by number butonly by the load currently experienced by the physical machine. Thenumber of maximum allowable connections or the maximum allowable machineload may be specified in the configuration file.

As described in greater detail in connection with FIG. 5, eachconfiguration file C1, C2, etc., may have an access rules database 113,including a Allow portion 115, a Deny portion 117, or both. Using theaccess rules database 113, the Web server is able to perform many of thefunctions of a conventional firewall, thereby enhancing networksecurity.

The Web server is self-daemoning, meaning that it is not subject to thelimitations ordinarily imposed by the usual Internet daemon, INETD.Referring to FIG. 2, when the Web server is brought up, it first readsin the master configuration file and then becomes a daemon and waits forconnection requests. When a connection request is received, the Webserver “forks a copy” of itself, using the forking capabilities of UNIX,to create a virtual host VHn to handle that connection request. When aparent process is forked to create a child process, the child processruns off the same base code as the parent process but using its own setof variables. In particular, the child process will typically use itsown sub-database from within the master configuration database todetermine the configuration of that particular virtual host. Childprocesses are created “on demand” as connection requests are receivedand complete running as service of those connection requests iscompleted.

As described in greater detail hereinafter, animation capabilities,instead of being an add-on feature provided through a CGI script, arebuilt into the server itself. Hence, in FIG. 2, when a request isreceived on a connection to process an animation file 201, the childprocess VHn belonging to that connection is able to process theanimation file directly.

Animation is one example of a recent enhancement now supported by someWeb servers, although typically through CGI and not directly. Numerousand varied other enhancements are sure to follow. Hence, the present Webserver, although it provides a default feature set, allows for thatdefault feature set to be readily expanded.

The default feature set is defined in the defaults file 111, an exampleof which is shown in FIG. 3. The defaults file is, in effect, a databasethat matches different types of requests with modules available forhandling those requests. The database is a table having, in theillustrated embodiment, four columns. In the first column is the fileextension received as part of the request. Examples of file extensionsare “ani” (animation), “cgi,” “html,” “shtml” (server-parsed HTML), etc.In the second column is a type identifier used internally by the Webserver, e.g., TY.sub.—ANIMATION, TY.sub.—CGI, etc. In the third columnis type information returned to the Web browser, e.g., “text/html,”“image/gif,” etc. In some instances, this type is not clearly defined inadvance but depends on the module called to process the request. Thetype returned to the browser may therefore be NULL. Finally, in thefourth column is the module to be called to process the request, e.g.,ProcessANI (an animation player), ProcessCGI, etc.

The defaults table of FIG. 3 serves as the foundation of a modularframework that allows extensions to the Web server to be easily added soas to run natively as part of the Web server. In one embodiment,extensions are added by modifying the source code file containing thedefaults table, to add a new row to the table, for example, or to modifyan existing row. A new module having new capabilities might besubstituted for an existing module, for example. The defaults file isthen recompiled and linked to the Web server. Preferably, a softwaredevelopment kit is provided with the Web server to facilitate thisprocess.

Hence, a mechanism is established that allows modules to be addedwithout the need to rebuild the entire Web server. In accordance withthis mechanism, adding an additional server feature involves thefollowing steps:

-   -   1. Edit the defaults file (the list of processes) and add an        entry for the specific file extension. Add the procedure name to        be used for processing this new type. Add an “# include” file        defining the procedure at the beginning of the defaults table.    -   2. Write the procedure. The procedural call to the process will        pass two parameters: a File Descriptor to send output to; and a        file Name of the document/file to process. The procedure should        be written accordingly.    -   3. Compile the procedure, link it into the Web server, and test.

The modular framework just described governs the capabilities of theoverall Web server. All customers may not want to pay for use of ahigh-performance Web server having a comprehensive feature set. Themulti-homing capabilities of the present Web server, however, allows thesame code to be configured differently for each of multiple virtualhosts, thereby catering to the preferences (and budgets) of differentclasses of customers. The effect is the same as offering a range ofdifferent Web server products of different capabilities, but with thedistinct advantage that only a single code package need be produced andmaintained.

Referring again to FIG. 1, apart from the defaults database, eachvirtual host has its own configuration sub-file C1, C2, etc. Within theconfiguration sub-file of each virtual host is a text-file database, notcompiled, that is similar in concept to the database of FIG. 3. However,the process to be called for a particular type of request may vary,virtual host to virtual host, from the default process specified in thedefaults database. On a virtual host that is configured to have a morelimited feature set, for example, CGI scripts may not be allowed.Therefore, the process specified for CGI, instead of ProcessCGI, mightbe NULL. Similarly with other capabilities. The differences between theconfiguration database and the defaults database, instead of limitingthe capabilities of the virtual host, may actually increase thecapabilities of the virtual host. For example, for HTML requests,instead of the usual SendFile process, the process ProcSHTML may bespecified. This configuration would allow all HTML files to includeother files, cause execution of other programs, etc., resulting in adynamic document rather than a static document.

Furthermore, the Web server may be a “client application” of a licenseserver, described in U.S. patent application Ser. No. 08/607,081AUTOMATED SYSTEM FOR MANAGEMENT OF LICENSED SOFTWARE now U.S. Pat. No.5,790,664, filed on even date herewith, incorporated herein byreference. Using the system described in the foregoing application,features of the Web server may be enabled or disabled on afeature-by-feature and virtual host-by-virtual host basis.

An example of a portion of a master configuration file is shown in FIG.4. Within the master configuration file database, different portions ofthe file form sub-databases for different virtual hosts. Eachsub-database may specify a root directory for that particular virtualhost.

Also as part of the configuration file of each virtual host, an accessrules database may be provided governing access to the virtual host,i.e., which connections will be allowed and which connections will bedenied. Many of the features more commonly included in a firewall maytherefore be included in the Web server itself. The syntax of the accessrules database is such as to allow great flexibility in specifying notonly what machines are or are not to be allowed access but also whensuch access is allowed to occur. The access rules database may have anAllow portion, a Deny portion or both. If the access rules database hasan Allow portion, only connections from machines matching the Allowrules will be allowed, regardless of whether there is also a Denyportion. If there is a Deny portion but no Allow portion, thenconnections from machines matching the Deny rules will be denied and allother connections will be allowed. Machines may be specified by name orby IP address, and may include “wildcards,” address masks, etc., forexample: MisterPain.com, *.srmc.com, 192.168.0.*, 192.168.0.0/24, and soon.

Time restrictions may be included in either the Allow rules or the Denyrules. For example, access may be allowed from 1 am to 12 pm;alternatively, access may be denied from 12 pm to 1 am. Also, rules maybe given identifiers, such as RULE1, RULE2, etc., and repeated elsewherewithin the configuration sub-file of the virtual host.

All access rules must be satisfied in order to gain access to a virtualhost. Depending on the virtual host, however, further levels of accessscrutiny may be specified within the configuration sub-file. Eachsuccessive level of access scrutiny includes all previous levels. Thefirst level of access scrutiny is that all rules must be satisfied, aspreviously described. The second level of access scrutiny is that theaccessing machine must have a DNS (Domain Name Services) entry. Having aDNS entry lends at least some level of legitimacy to the accessingmachine. The third level of access scrutiny is that the accessingmachine must in addition have a reverse DNS entry. The fourth and moststringent level of access scrutiny is that the forward DNS entry and thereverse DNS entry must match.

If access is granted and a connection is opened, when the connection islater closed, a log entry is made recording information about thataccess. One important feature of the present Web server is that logentries identify the particular virtual host that was accessed. Anotherimportant feature is that log entries identify the “referrer,” i.e., thesource of any link that may have been followed to get to the Web sitethat was accessed. The owner of a Web site may advertise that sitethrough various different channels. In order to determine what works andwhat does not, in terms of generating hits on a Web site, one must knowhow someone came to access that Web site.

Referring to FIG. 5, conventional log entries are typically of a formatsimilar to the one shown. The IP address or name 501 of the accessingmachine is recorded, followed by the UserName 503, if any, enteredduring the course of the access, the date and time 505, the connectionrequest 507 as it was received, an error code ERC (509) specifying anyerror that may have occurred, and a count 511 of the number of bytestransferred. As shown in FIG. 6, the present Web server logs in additionthe identity of the virtual host (651) and the referrer (653). Logreports may be generated from this information, listing, for example,the top referrers generating hits to a Web site, etc. Log reports may begenerated on a per-host basis or may be generated for the physicalmachine, i.e., all virtual hosts together.

Referring now to FIG. 7, the logical structure of the present Web serveris shown in greater detail.

The main execution thread of the Web server is controlled by a daemon.In FIG. 7, the daemon includes elements 701, 703 and 705. Although thedaemon mode of operation is the default mode, the same code can also berun interactively under the conventional INETD daemon. Hence, when theWeb server is first brought up, command-line processing is performed inblock 701 to determine the mode of operation (daemon or interactive),which configuration file to read, etc. For purposes of the presentdiscussion, the daemon mode of operation, which is the default, will beassumed.

Immediately thereafter, the daemon changes user in block 703 so as tobecome an unprivileged user. This step of becoming an unprivileged useris a security measure that avoids various known security hazardsencountered, for example, when CGI scripts or other programs are allowedto run.

Only after the daemon has read the specified configuration file andbecome an unprivileged user does the daemon actually become a daemon. Bydaemonizing after the configuration file (e.g., the master configurationfile) has been read in, the configuration file in effect becomes “hardcoded” into the program such that the program no longer has read it in.The daemon then waits to receive a connection request.

When a connection request is received, the daemon forks a copy of itselfto handle the connection request. The daemon then uses a piece of codereferred to herein as an INET Wrapper 710 to check on the local side ofthe connection and the remote side of the connection to determine, inaccordance with the appropriate Allow and Deny databases, whether theconnection is to be allowed.

First the address and name (if possible) are obtained of the virtualmachine for which a connection is requested. Once the local host hasbeen identified by name or at least by IP address, the masterconfiguration database is scanned to see if a corresponding sub-databaseexists for that local host. If so, the sub-database is set as theconfiguration database of the local host so that the masterconfiguration database need no longer be referred to. If nocorresponding sub-database is found, then by default the masterconfiguration database is used as the configuration database. There maybe any number of virtual machines, all independently configurable andall running on the same physical machine. The determination of whichvirtual host the daemon child process is to become is made in block 705,under the heading of “multi-homing.”

Once the daemon child process has determined which host it is, the INETWrapper is used to do checking on the remote host, i.e., the hostrequesting the connection. Recalling the different levels of accessscrutiny described previously, first, the configuration database isconsulted to determine the level of access scrutiny that will beapplied. (The default level of access scrutiny is that no DNS entry isrequired.) Then, the address and name (if possible) are obtained of themachine requested the connection, and the appropriate level of accessscrutiny is applied as determined from the configuration database.

If the remote host satisfies the required level of access scrutinyinsofar as DNS entries are concerned, the INET Wrapper gets the Allowand Deny databases for the virtual host. First the Allow database ischecked, and if there is an Allow database but the remote host is notfound in it, the connection is denied. Then the Deny database ischecked. If the remote host is found in the Deny database, then theconnection is denied. All other rules must also be satisfied, regardingtime of access, etc. If all the rules are satisfied, then the connectionis allowed.

Once the connection has been allowed, the daemon invokes HTTP servercode 720 that operates in large part in a similar manner as conventionalWeb server. The HTTP server code 720 processes commands by examining thefilename extension associated with the command in block 721 and callingappropriate routines such as routines 723-726 to process those commands.When processing is completed, the connection is closed, if it has notalready been closed implicitly.

Several features of the HTTP server code should be noted. The serverincludes code for handling both client and server proxies and redirects,all as part of the Web server. The server mode is determined inaccordance with the configuration file of the virtual host handling therequest. The configuration file may specify Client Proxy mode for thevirtual host, in which case the virtual host proxies requests directedto the outside world, e.g., Web sites other than the present Web site.The configuration file may specify Server Proxy mode for the virtualhost, in which case the virtual host proxies requests to access adifferent virtual host. The configuration file may specify Redirectmode, in which case the request is redirected to a different specifiedserver, either a different virtual host on the same physical machine ora different physical machine altogether.

The animation player 726 of the present Web server also differs insignificant respects from conventional animation players. Fundamentally,to the knowledge of the inventors, no other Web server incorporates ananimation player as part of the native Web server code. By incorporatingthe animation player into the Web server itself, instead of adding theanimation capabilities through the use of a CGI script, for example,animations may be handled much more efficiently. Furthermore, unlikeconventional animation players, which typically just send a sequence ofgraphics, the present animation player provides full-fledge programmingcapability, including the ability to send one graphic at a specifiedtime and then a next graphic at a next specified time. When a line isreached in the animation file that calls for a graphic to be displayedat a certain time, if that time has already passed, then that line isignored by the animation player and the graphic is not sent. Instead theanimation player tries to display the next graphic at the next specifiedtime. In this manner, regardless of the speed of the connection, theplaying time of the animation is always the same. On a slow connection,the user will see fewer frames, and on a fast connection the user willsee more frames. The length of the animation will be the same. Also,labels may be included in the animation, and commands may be used to goto a specified label, or go to the beginning of the animation.

It will be appreciated by those of ordinary skill in the art that theinvention can be embodied in other specific forms without departing fromthe spirit or essential character thereof. The foregoing description istherefore considered in all respects to be illustrative and notrestrictive. The scope of the invention is indicated by the appendedclaims, and all changes which come within the meaning and range ofequivalents thereof are intended to be embraced therein.

1. A multi-homed web server comprising: a plurality of virtual hostsaccessible using connection requests passed over a computer network,each of the virtual hosts being identified by a corresponding virtualhost identifier includable in a connection request; a plurality ofexecutable modules, each of the modules defining a predeterminedfunction; a plurality of configuration sub-files corresponding to thevirtual hosts, each of the configuration sub-files defining which of theexecutable module functions are usable by a corresponding one of thevirtual hosts; a processor for executing instructions operable withinsaid multi-homed web server, wherein execution of the instructions bythe processor: receives a request from a client over said public networkto view an animation comprising a series a graphics; send a firstgraphic to said client; send a next graphic in said series of graphicsat a specified time; determine whether the specified time to send asubsequent graphic in said series of graphics has passed; if saidspecified time has not passed, then send a next graphic in said seriesof graphics at said specified time; and if said specified time haspassed, then send a next graphic in said series of graphics at a nextspecified time.
 2. The multi-homed web server of claim 1, wherein saidanimation is served said series of graphics is sent to said client. 3.The multi-homed web server of claim 2, wherein the playing time saidseries of graphics is substantially equal regardless of the speed ofsaid client's public network connection.
 4. The multi-homed web serverof claim 1, further comprising labels in said animation file forproviding navigation aids allowing a user to navigate within saidanimation.
 5. The multi-homed web server of claim 4, wherein at leastone of said navigational aids allows said user to go to a specific labelin said animation.